import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/blade-system/tenant/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
export const remove = (ids) => {
  return request({
    url: '/api/blade-system/tenant/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (params) => {
  return request({
    url: '/api/blade-system/tenant/submitAll',
    method: 'post',
    data:params
  })
}

export const update = (row) => {
  return request({
    url: '/api/blade-system/tenant/submitAll',
    method: 'post',
    data: row
  })
}

export const getTopMenusCodes = (tenantId) => {
  return request({
    url: '/api/blade-system/menu/GetTenantTopRoutes',
    method: 'get',
    params:{
      tenantId
    }
  })
}

// 初始化接口
export const dataInit = (corpid) => {
  return request({
    url: '/api/blade-public/dictCommon/init',
    method: 'post',
    params:{
      corpid
    }
  })
}
